/**
 * Created by Freeman on 2017/6/30.
 */



const Router = require ('koa-router');
const compose = require('koa-compose');
const RouterAuth = require('./auth')

const router = new Router();

router.use('/oauth', RouterAuth.routes(), RouterAuth.allowedMethods())

router.get('*', async (ctx, next) => {
  ctx.body = { status : 404 }
})

function routes() {
  return compose([
      router.routes(),
      router.allowedMethods()
    ])
}

module.exports =  routes